package book;

public class BookList {
    private Book[] books = new Book[10];
    private int usedSize;

    public BookList(){
        books[0]=new Book("三国演义","罗贯中",15,"名著");
        books[1]=new Book("我不是戏神","三九音域",25,"网文");
        books[2]=new Book("活着为了讲述","加西亚·马尔克斯",30,"名著");
        books[3]=new Book("吞噬星空","我不吃西红柿",10,"漫画");
        this.usedSize=4;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(int pos,Book book) {
        books[pos] = book;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public boolean isfull(){
        if (usedSize== books.length){
            return true;
        }else{
            return false;
        }
    }
}
